package com.ita.acmsystem.merchant.validator.impl;

import com.ita.acmsystem.merchant.validator.IValidator;

public class FoodsPriceValidatorImpl implements IValidator {

	private static final String FOOD_PRICE_IS_NULL = "Food price can't be null!"; 
	private static final String FOOD_PRICE_IS_BLANK = "Food price can't be blank!"; 
	private static final String FOOD_NAME_SHOULD_BE_NUM = "Food name should be number!"; 

	@Override
	public String validate(String input) {
		String result = "";
		if (input == null) {
			result = FOOD_PRICE_IS_NULL;
		} else if ("".equals(input)) {
			result = FOOD_PRICE_IS_BLANK;
		} else if (input.length() > 120) {
			result = FOOD_NAME_SHOULD_BE_NUM;
		}
		return result;
	}

}
